package com.adcc.loadsheet.billing.entity.chargerule;

import com.adcc.loadsheet.billing.entity.BasisEntity;
import com.adcc.loadsheet.billing.vo.chargerule.BillingLadderEntityVO;

import java.math.BigDecimal;

/**
 * 计费阶梯表实体类
 * Created by zhaoml on 2020/4/7.
 */
public class BillingLadderEntity extends BasisEntity<BillingLadderEntityVO> {
    private Integer billingLadderId;     //主键ID
    private Integer billingRuleId;   //计费规则表主键ID
    private Integer ladderStartnumber;  //阶梯开始数
    private Integer ladderEndnumber;    //阶梯结束数
    private BigDecimal unitPrice;   //单价

    @Override
    public BillingLadderEntityVO toVO() {
        BillingLadderEntityVO vo = new BillingLadderEntityVO();
        vo.setBillingLadderId(this.billingLadderId);
        vo.setBillingRuleId(this.billingRuleId);
        vo.setLadderStartnumber(this.ladderStartnumber);
        vo.setLadderEndnumber(this.ladderEndnumber);
        vo.setUnitPrice(this.unitPrice);
        vo.setUnitPriceStr(this.unitPrice.toString());
        return vo;
    }

    public Integer getBillingLadderId() {
        return billingLadderId;
    }

    public void setBillingLadderId(Integer billingLadderId) {
        this.billingLadderId = billingLadderId;
    }

    public Integer getBillingRuleId() {
        return billingRuleId;
    }

    public void setBillingRuleId(Integer billingRuleId) {
        this.billingRuleId = billingRuleId;
    }

    public Integer getLadderStartnumber() {
        return ladderStartnumber;
    }

    public void setLadderStartnumber(Integer ladderStartnumber) {
        this.ladderStartnumber = ladderStartnumber;
    }

    public Integer getLadderEndnumber() {
        return ladderEndnumber;
    }

    public void setLadderEndnumber(Integer ladderEndnumber) {
        this.ladderEndnumber = ladderEndnumber;
    }

    public BigDecimal getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(BigDecimal unitPrice) {
        this.unitPrice = unitPrice;
    }
}